package com.windbell.rest.services

import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import org.springframework.beans.factory.annotation.Autowired
import edu.fudan.mylang.pf.IObjectFactory
import java.util.Collection
import com.windbell.rest.shared.hospital.UICCHospital
import com.windbell.rest.server.service.hospital.CCHospitalMapper
import windbell.domain.organization.CCHospital

@Service
@Transactional
class CCHospitalService {
	@Autowired private IObjectFactory entities
	@Autowired private CCHospitalMapper hospitalMapper
	
	def Collection<UICCHospital> getHospitalList(){
		entities.all(CCHospital).^map[hospitalMapper.transform(it)].toList
	}
}